package qc.module.duty.mapper;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import qc.module.duty.dto.team.DutyTeamDto;
import qc.module.duty.entity.DutyTeam;

@Mapper
public interface DutyTeamMapper {
    DutyTeamMapper MAPPER = Mappers.getMapper(DutyTeamMapper.class);


    @Mapping(target = "groupid", source = "gid")
    @Mapping(target = "members", ignore = true)
    @Mapping(target = "deptid", ignore = true)
    DutyTeamDto toDto(DutyTeam en);


    @Mapping(target = "gid", source = "groupid")
    DutyTeam toEntity(DutyTeamDto dto);

}
